<?php

/**
 * LongProgramCondition form.
 *
 * @package    sf_sandbox
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id: sfDoctrineFormTemplate.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class LongProgramConditionForm extends BaseLongProgramConditionForm {

    public function configure() {
        unset($this['long_program_id']);
//        $this->widgetSchema['condition_text']->setAttribute('style','width:100%');
        $this->widgetSchema['condition_text']->setLabel(' ');
    }

    public function save($con = null) {
        $user = sfContext::getInstance()->getUser();
        if ($user->hasAttribute('long_program_id'))
            $this->object->set('long_program_id', $user->getAttribute('long_program_id'));

        return parent::save($con);
    }

}
